<template>
	<view>
		<view class="content" v-if="JSON.stringify(info) != '{}'">
			<view class="title-box">
				{{info.title}}
			</view>
			<view class="time-box">
				{{timeFormat(info.createTime,'yyyy-mm-dd hh:MM:ss')}}
			</view>
			<view class="des-box">
				{{info.content}}
			</view>

			<view class="statistics-box">
				<!-- <view class="left-box">
					<view>
						<image src="../../static/img/consult/Read.png" style="width: 27rpx; height: 27rpx;"></image>
						<text>1k</text>
					</view>
					<view>
						<image src="../../static/img/consult/message.png" style="width: 27rpx; height: 27rpx;"></image>
						<text>6</text>
					</view>
					<view>
						<image src="../../static/img/consult/forward.png" style="width: 27rpx; height: 27rpx;"></image>
						<text>5</text>
					</view>
				</view>
				<view class="right-box">
					<image src="../../static/img/consult/like-a.png" style="width: 27rpx; height: 27rpx;"></image>
					<text>{{$t('consult.like')}}</text>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script setup>
	import {onLoad} from '@dcloudio/uni-app'
	import {ref} from 'vue'
	import { timeFormat } from '@/uni_modules/uview-plus';
	
	const info = ref({})
	
	onLoad((options)=>{
		
		if(options.info){
			info.value = JSON.parse(options.info)
		}
	})
</script>

<style lang="scss" scoped>
	.content{
		width: calc(100vw - 80rpx);
		margin: 40rpx auto;
	}
	.title-box {
		font-weight: 500;
		font-size: 30rpx;
		color: #3D3D3D;
		margin-bottom: 20rpx;
	}

	.time-box {
		color:#999999;
	}

	.des-box {
		font-weight: 500;
		font-size: 30rpx;
		color: #666666;
		margin-bottom: 40rpx;
		line-height:50rpx;
		margin-top:20rpx;
	}


	.statistics-box {
		display: flex;
		justify-content: space-between;
		align-items: center;

		.left-box {
			display: flex;
			justify-content: flex-start;
			align-items: center;
			color: #6E6E6E;

			view {
				margin-right: 50rpx;

				text {
					font-weight: 500;
					font-size: 24rpx;
					padding-left: 6rpx;
				}
			}
		}

		.right-box {
			color: #6E6E6E;

			text {
				font-weight: 500;
				font-size: 24rpx;
				padding-left: 6rpx;
			}
		}
	}
</style>